0 CLS:POKE49151,64:PRINT"PLEASE WAIT..."
1 DIMM(31,20),N(31,20),TT(4),SX(101),SYY(101),MX,MY,ST,MC,V,H,X,Y,Z,OH,OV,B,C,R
5 CLS:MC=16384:REM CHANGE MC=1024 FOR COCO
10 PRINT@11,"minefield";:POKEMC+20,33
20 PRINT@100,"BY KENNETH REIGHARD, JR."
30 PRINT@130,"MC-10 VERSION BY JIM GERRIE"
40 PRINT@268,"1. EASY":PRINT@300,"2. MEDIUM":PRINT@332,"3. HARD"
50 QQ$=INKEY$:H=RND(10):IF QQ$="" THEN 50
55 IFQQ$<>CHR$(49)ANDQQ$<>CHR$(50)ANDQQ$<>CHR$(51)THEN50
56 SK=VAL(QQ$):IFSK<1ORSK>3THEN50
58 PRINT@454,"ONE MOMENT PLEASE...";
60 ONSKGOTO65,70,75
65 MX=9:MY=9:B=10:GOTO80
70 MX=19:MY=12:B=40:GOTO80
75 MX=31:MY=14:B=70
80 L=B:R=(MX+1)*(MY+1)-B
100 FORZ=1TOB
105 H=RND(MX):V=RND(MY):IF M(H,V)=-1THEN105
112 M(H,V)=-1:NEXT
120 FORV=0TOMY:FORH=0TOMX:IFM(H,V)<>-1THEN155
130 FORY=-1TO1:FORX=-1TO1:IFX=0ANDY=0THEN150
140 IFH+X<0ORH+X>MXORV+Y<0ORV+Y>MYTHEN150
145 IFM(H+X,V+Y)<>-1THENM(H+X,V+Y)=M(H+X,V+Y)+1
150 NEXT:NEXT
155 NEXT:NEXT
160 CLS0:FORX=0TOMX:FORY=0TOMY:PRINT@X+Y*32,".";
205 NEXT:NEXT
210 H=0:V=0:T=0
220 IFPEEK(MC+H+32*V)-64>0THENGOSUB600
230 PRINT@495,L;CHR$(128);:IFR=0THENPRINT@480,"YOU WIN!            ";:GOTO450
240 Q=PEEK(383)ANDPEEK(2):IFQTHEN250
245 GOTO240
250 QQ$=CHR$(Q):IFQQ$="A"THENGOSUB620:H=H-1:IFH<0THENH=MX:GOTO220
255 IFQQ$="S"THENGOSUB620:H=H+1:IFH>MXTHENH=0:GOTO220
260 IFQQ$="Z"THENGOSUB620:V=V+1:IFV>MYTHENV=0:GOTO220
265 IFQQ$="W"THENGOSUB620:V=V-1:IFV<0THENV=MY:GOTO220
270 IFQQ$=CHR$(13)ANDN(H,V)=0ANDL>0THENPRINT@H+(V*32),"?";:N(H,V)=1:L=L-1:FORZ=1TO35:NEXT:GOTO220
272 IFQQ$=CHR$(13)ANDN(H,V)=1THENPRINT@H+(V*32),".";:N(H,V)=0:L=L+1:FORZ=1TO35:NEXT:GOTO220
275 IFQQ$<>CHR$(32)THEN220
280 IFN(H,V)<>0THEN220
285 POKEMC+H+(V*32),96:C=M(H,V):IFC=-1THEN400
300 R=R-1
305 IFC=0THENN(H,V)=3:GOTO325
310 PRINT@H+(V*32),CHR$(C+48);:N(H,V)=2:GOTO220
325 OH=H:OV=V:ST=1:SX(ST)=H:SYY(ST)=V
335 IFST=0THENH=OH:V=OV:GOTO 220
340 X=SX(ST):Y=SYY(ST):FORH=X-1TOX+1:FORV=Y-1TOY+1
350 IFH<0ORH>MXORV<0ORV>MYTHEN390
355 IFN(H,V)<>0THEN390
360 IFM(H,V)>0THENN(H,V)=2:R=R-1:PRINT@H+(V*32),CHR$(M(H,V)+48);:GOTO390
365 IFM(H,V)=-1THEN390
370 POKEMC+H+(V*32),96:N(H,V)=3
380 R=R-1:ST=ST+1:SX(ST)=H:SYY(ST)=V:GOTO340
390 NEXT:NEXT
395 ST=ST-1:GOTO335
400 POKEMC+H+(V*32),42:GOSUB8000:PRINT@480,"YOU LOSE.          ";
405 FORV=0TOMY:FORH=0TOMX
410 IFM(H,V)=-1THENPRINT@H+(V*32),"*";
415 IFN(H,V)=1ANDM(H,V)<>-1THENPRINT@H+(32*V),"X";
420 NEXT:NEXT
450 FORV=0TOMY:FORH=0TOMX:IFM(H,V)=-1ANDN(H,V)<>1THENPRINT@H+V*32,"*";
460 NEXT:NEXT
480 PRINT@495,"PLAY AGAIN (Y/N)";:POKEMC+511,127 
560 QQ$=INKEY$:IFQQ$="Y"ORQQ$="Y"THENRUN
570 IFQQ$<>"N"ANDQQ$<>"N"THEN560
580 SOUND100,1:END
600 POKEMC+H+(32*V),PEEK(MC+H+(32*V))-64:RETURN
620 POKEMC+H+(32*V),PEEK(MC+H+(32*V))+64:RETURN
8000 FORX=1TO10:SOUND1,1:POKE49151,64:FORZ=1TO35:NEXT:NEXT:RETURN
